package chapter;

public class object_Cooking {
    public static void main(String[] args) {
        Cooking c = new Cooking();
        c.name = "红烧排骨";
        c.food = "排骨";
        c.execute();

    }
}
class Cooking{
    String name;
    String type = "红烧";
    String food;
    String relish = "大料";
    void execute() {
        System.out.println("准备食材" + food);
        System.out.println("准备佐料" + relish);
        System.out.println("开始烹饪");
        System.out.println(name + "烹饪完成");

    }
    {
        System.out.println("静态代码");
        //TODO 静态代码被引用时会自动执行
    }
}